package OOP.Poly_Exercise.PolyExercise_Arr;

public class Animal {
    private String name;
    //构造器
    public Animal(String name) {
        this.name = name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void cry() {
        System.out.println("i am a animal!");
    }
}
